import type { KeyParam, LoginPwdAPIParams, LoginPwdData, LoginSmsAPIParams } from '@/types/login'
import { request } from '@/utils/request'

// <!-- 登录--密码登录
// POST
// /login/password -->
export const LoginPwdAPI = (data: LoginPwdAPIParams) => {
  return request<LoginPwdData>('/login/password', 'POST', data)
}
// 登录--手机验证码登录
// POST
// /login
export const LoginSmsAPI = (data: LoginSmsAPIParams) => {
  return request<LoginPwdData>('/login', 'POST', data)
}
// 获取手机验证码
// GET
// /code
export const GetCodeAPI = (data: KeyParam) => {
  return request<{ code: string }>('/code', 'GET', data)
}
